home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util1
/
yk211src.lha
/
Yak_2.11_Src
/
Requesters.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-18
|
1KB
|
77 lines
#define __USE_SYSBASE
#include <exec/types.h>
#include <intuition/intuitionbase.h>
#include <stdarg.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include "Code.h"
#include "Requesters.h"
#ifdef PREFS
# define REQUESTER_TITLE "Yak-Prefs"
#else
# define REQUESTER_TITLE "Yak"
#endif
/* simple requesters with args */
void
PostError(char *body, ... )
{
struct EasyStruct es;
va_list args;
if (!IntuitionBase)
{
Write(Output(), "Need AmigaDos 2.0+\n", -1);
return;
}
/* setup the argument array */
va_start( args, body );
/* initialise the structure */
es.es_StructSize = sizeof(struct EasyStruct);
es.es_Flags = 0L;
es.es_Title = REQUESTER_TITLE;
es.es_TextFormat = body;
es.es_GadgetFormat = "OK";
/* display the requester */
EasyRequestArgs(NULL, &es, NULL, args);
/* free the arguments */
va_end( args );
}
LONG
GetOrders(char *gadtext, char *body, ... )
{
struct EasyStruct es;
LONG rc;
va_list args;
/* setup the argument array */
va_start( args, body );
/* initialise the structure */
es.es_StructSize = sizeof(struct EasyStruct);
es.es_Flags = 0L;
es.es_Title = REQUESTER_TITLE;
es.es_TextFormat = body;
es.es_GadgetFormat = gadtext;
/* display the requester */
rc = EasyRequestArgs(NULL, &es, NULL, args);
/* free the arguments */
va_end( args );
return rc;
}